package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 攻略评论类
 */
@Getter
@Setter
public class StrategyComment extends BaseDomain {

    /*对应攻略评论状态:1推荐,0普通*/
    public static final int STATE_COMMEND = 1;
    public static final int STATE_NORMAL = 0;

    /*创建评论的用户*/
    private User user;

    /*创建评论的时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;

    /*评论内容*/
    private String content;

    /*图片评论*/
    private String imgUrls;

    /*用户对该攻略的评星*/
    private Integer starNum;

    /*该攻略评论所属攻略*/
    private Strategy strategy;

    /*状态:1推荐,0普通*/
    private Integer state = 0;

    /*攻略评论推荐时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date commendTime;

}